package com.famdoc.Controller;

import com.famdoc.Pojo.dto.PatientSigningForm;
import com.famdoc.Pojo.dto.PatientSigningHomeForm;
import com.famdoc.Pojo.dto.Result;
import com.famdoc.Service.SigningService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SigningHomeController {

    @Autowired
    private SigningService signingService;

    /**
     * 家庭签约
     * @param patientSigningHomeForm
     * @return
     */
    @PostMapping("/signingHome")
    public Result Signing(@RequestBody PatientSigningHomeForm patientSigningHomeForm){
        return signingService.signingHome(patientSigningHomeForm);
    }

    /**
     * 家庭续约
     * @param patientSigningHomeForm
     * @return
     */
    @PostMapping("/signedHome")
    public Result Signed(@RequestBody PatientSigningHomeForm patientSigningHomeForm){
        return signingService.signedHome(patientSigningHomeForm);
    }
}
